@extends("admin.frame_layout")
<?php $top_selected = "系统设置";$page_menu = "数据库备份" ?>
@section('head')
    <style type="text/css">
        #output_list tbody td {
            line-height: 35px;
        }

        #output_list tbody td img {
            position: relative;
            top: 3px;
        }

        #output_list tbody td.download span {
            transition: background .8s;
        }

        #output_list tbody td.download span:hover {
            background: #1FAB4D;
        }

        #output_list tbody td a {
            border-radius: 2px;
            padding: 4px 10px;
            transition: background, color .5s, .3s;
            /*transition: color .5s;*/
        }

        #output_list tbody td a:hover {
            background: #FF5722;
            color: #FFF;
        }
    </style>
@endsection
@section('content')
    <div class="rightinfo">
        <div class="tools">
            <ul class="toolbar">
                <li onclick="openOkDlg('{{route('admin.sqls.bak')}}')">
                    <span><img src="{{asset('admin/imgs/icon05.png')}}" width="25"/></span>手动备份系统数据库
                </li>
            </ul>
        </div>
        <table class="filetable" id="output_list">

            <thead>
            <tr>
                <th width="25%">名称</th>
                <th width="11%">修改日期</th>
                <th width="10%">类型</th>
                <th width="6%">大小</th>
                <th width="42%"></th>
                <th width="6%">操作</th>
            </tr>
            </thead>

            <tbody>
            @foreach($files as $file)
                <tr>
                    <td class="download"
                        onclick="openOkDlg('{{route('admin.download', ['key' => base64_encode("sqls\\$file")])}}')"
                        title="点击下载">
                        <img src="{{ asset('admin/imgs/f03.png') }}"/><span>{{ $file }}</span>
                    </td>
                    <td>{{ date("Y-m-d H:i:s",filemtime(public_path('sqls\\'.$file))) }}</td>
                    <td>SQL 文件</td>
                    <td>{{ getFileSize(public_path('sqls\\'.$file)) }}</td>
                    <td></td>
                    <td class="del">
                        <a onclick="openOkDlg('{{route('admin.delete', ['key' => base64_encode("sqls\\$file")])}}')">删除</a>
                    </td>
                </tr>
            @endforeach
            </tbody>

        </table>
    </div>

    @include('admin.coms.dialog')
@endsection
@section('footer')
    <script type="text/javascript">
        $(document).ready(function () {
            //初始化表格操作菜单
            $('.tablelist tbody tr:odd').addClass('odd');
            $(".tablelist .act").hover(function () {
                $($(this).attr("bind")).show();
            }, function () {
                $($(this).attr("bind")).hide();
            });
        });
    </script>

@endsection

